<!DOCTYPE >

<html lang="ja">
    <head>
        <meta charset="utf-8"> 
        <title>iPhone Orientation</title>
        
        <style></style>
        <script>
            var $id = function(id) { return document.getElementById(id); };
            
            window.onorientationchange = function(){
                $id("angle").innerHTML = window.orientation;
            };
        </script>
    </head>
    <body>
        <h1>iPhone Orientation</h1>
        <p>iPhone の角度を取得</p>
        <p>角度 : <span id="angle"></span></p>
    </body>
</html>
